home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / dev / moni / SystemViewer.lha / Source / SysHardware.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-15  |  15.5 KB  |  672 lines

  1. /****h* SysHardware/SysHardware.c ***********************************
  2. *
  3. * NAME
  4. *    SysHardware.c
  5. *
  6. * DESCRIPTION
  7. *    Display some information about the Amiga Hardware found.
  8. *
  9. * NOTES
  10. *    $VER: SysHardware.c 1.0 (12-Feb-2001) by J.T. Steichen
  11. *********************************************************************
  12. *
  13. */
  14.  
  15. #include <stdio.h>
  16. #include <string.h>
  17.  
  18. #include <exec/types.h>
  19. #include <exec/execbase.h>
  20.  
  21. #include <AmigaDOSErrs.h>
  22.  
  23. #include <dos/dosextens.h>
  24.  
  25. #include <intuition/intuition.h>
  26. #include <intuition/classes.h>
  27. #include <intuition/classusr.h>
  28. #include <intuition/gadgetclass.h>
  29.  
  30. #include <libraries/gadtools.h>
  31. #include <libraries/expansion.h>
  32. #include <libraries/expansionbase.h>
  33.  
  34. #include <graphics/displayinfo.h>
  35. #include <graphics/gfxbase.h>
  36.  
  37. #include <clib/exec_protos.h>
  38. #include <clib/intuition_protos.h>
  39. #include <clib/gadtools_protos.h>
  40. #include <clib/graphics_protos.h>
  41. #include <clib/utility_protos.h>
  42. #include <clib/diskfont_protos.h>
  43.  
  44. #include "CPGM:GlobalObjects/CommonFuncs.h"
  45.  
  46. #include "SysLists.h"
  47.  
  48. #define HLV     0
  49. #define Cancel  1
  50.  
  51. #define ATS_CNT 2
  52.  
  53. IMPORT  struct ExecBase *SysBase; // GfxBase in SysLists.h
  54.  
  55. PRIVATE struct ExpansionBase *ExpansionBase;
  56.  
  57. PRIVATE char vr[] = "$VER: SysHardware 1.0 (12-Feb-2001) by J.T. Steichen";
  58.  
  59. PRIVATE struct TextFont *ATSFont  = NULL;
  60. PRIVATE struct Window   *ATSWnd   = NULL;
  61. PRIVATE struct Gadget   *ATSGList = NULL;
  62. PRIVATE struct Gadget   *ATSGadgets[ ATS_CNT ];
  63.  
  64. PRIVATE struct IntuiMessage  ATSMsg;
  65.  
  66. PRIVATE UWORD  ATSLeft   = 0;
  67. PRIVATE UWORD  ATSTop    = 16;
  68. PRIVATE UWORD  ATSWidth  = 640;
  69. PRIVATE UWORD  ATSHeight = 270;
  70. PRIVATE UBYTE *ATSWdt    = (UBYTE *) "System Hardware Info:";
  71.  
  72. PRIVATE UBYTE *ttl = "Brd.Addr: Brd.Size: Mfg-ID: Prod: Driver: Flags:    S/N: DiagVec:  Type:";
  73.  
  74. PRIVATE char fmt[] = "$%08LX $%08LX %5d %5d   %-3.3s     $%08LX  %d   $%08LX %d";
  75.  
  76. // ----------------------------------------------------------------------
  77.  
  78. #define MAXHVNODES 26
  79. #define NODELENGTH 80
  80.  
  81. PRIVATE struct Node HLVNodes[ MAXHVNODES ] = { 0, };
  82.  
  83. PRIVATE struct List HLVList = { 0, };
  84.  
  85. PRIVATE UBYTE NodeStrs[ MAXHVNODES * NODELENGTH ] = ""; 
  86.  
  87. // ----------------------------------------------------------------------
  88.  
  89. PRIVATE int HLVClicked(    void );
  90. PRIVATE int CancelClicked( void );
  91.  
  92. PRIVATE struct NewGadget ATSNGad[] = {
  93.  
  94.      2,   3, 627, 250,                NULL, NULL, HLV, 
  95.    0, NULL, (APTR) HLVClicked,
  96.  
  97.    295, 250,  72,  17, (UBYTE *) "_Cancel", NULL, Cancel, 
  98.    PLACETEXT_IN, NULL, (APTR) CancelClicked
  99.  
  100. };
  101.  
  102. PRIVATE ULONG ATSGTags[] = {
  103.  
  104.    GTLV_ReadOnly, TRUE, GTLV_ShowSelected, NULL,
  105.    LAYOUTA_Spacing, 2, TAG_DONE,
  106.    
  107.    GT_Underscore, '_', TAG_DONE
  108. };
  109.  
  110. PRIVATE UWORD ATSGTypes[] = { LISTVIEW_KIND, BUTTON_KIND };
  111.  
  112. // ----------------------------------------------------------------------
  113.  
  114. SUBFUNC char *GetProcType( void )
  115. {
  116.    if ((SysBase->AttnFlags & AFF_68060) == AFF_68060)
  117.       return( "68060" );
  118.  
  119.    if ((SysBase->AttnFlags & AFF_68040) == AFF_68040)
  120.       return( "68040" );
  121.  
  122.    if ((SysBase->AttnFlags & AFF_68030) == AFF_68030)
  123.       return( "68030" );
  124.  
  125.    if ((SysBase->AttnFlags & AFF_68020) == AFF_68020)
  126.       return( "68020" );
  127.  
  128.    if ((SysBase->AttnFlags & AFF_68010) == AFF_68010)
  129.       return( "68010" );
  130.    else
  131.       return( "68000" );
  132. }
  133.  
  134. SUBFUNC char *GetFPUType( void )
  135. {
  136.    if ((SysBase->AttnFlags & AFF_FPU40) == AFF_FPU40)
  137.       {
  138.       if ((SysBase->AttnFlags & AFF_68040) == AFF_68040)
  139.          return( "68882 (68040 FPU)" );
  140.       else
  141.          return( "NONE" );
  142.       }
  143.  
  144.    if ((SysBase->AttnFlags & AFF_68882) == AFF_68882)
  145.       return( "68882" );
  146.  
  147.    if ((SysBase->AttnFlags & AFF_68881) == AFF_68881)
  148.       return( "68881" );
  149.    else
  150.       return( "NONE" );
  151. }
  152.  
  153. SUBFUNC char *GetInstCache( void )
  154. {
  155.    IMPORT int GetCacheReg( void );
  156.  
  157.    ULONG result = Supervisor( (void *) GetCacheReg );
  158.  
  159. //   fprintf( stderr, "GetCacheReg() returned 0x%08LX\n", result );
  160.  
  161.    if ((result & 0x00008000) == 0x00008000) // bit 15 of CACR set??
  162.       return( "ON" );
  163.    else
  164.       return( "OFF" );
  165. }
  166.  
  167. SUBFUNC char *GetDataCache( void )
  168. {
  169.    IMPORT int GetCacheReg( void );
  170.  
  171.    ULONG result = Supervisor( (void *) GetCacheReg );
  172.  
  173. //   fprintf( stderr, "GetCacheReg() returned 0x%08LX\n", result );
  174.  
  175.    if ((result & 0x80000000) == 0x80000000) // bit 31 of CACR set??
  176.       return( "ON" );
  177.    else
  178.       return( "OFF" );
  179. }
  180.  
  181. SUBFUNC char *GetBurstCache( void )
  182. {
  183.    IMPORT int GetMMUsrReg( void );
  184.  
  185.    ULONG result = Supervisor( (void *) GetMMUsrReg );
  186.  
  187. //   fprintf( stderr, "GetMMUsrReg() returned 0x%08LX\n", result );
  188.  
  189.    if ((result & 0x00000060) == 0x00000040) // burst mode??
  190.       return( "ON" );
  191.    else
  192.       return( "OFF" );
  193. }
  194.  
  195. SUBFUNC char *GetCopyBackCache( void )
  196. {
  197.    IMPORT int GetMMUsrReg( void );
  198.  
  199.    ULONG result = Supervisor( (void *) GetMMUsrReg );
  200.  
  201. //   fprintf( stderr, "GetMMUsrReg() returned 0x%08LX\n", result );
  202.  
  203.    if ((result & 0x00000060) == 0x00000020) // CopyBack mode??
  204.       return( "ON" );
  205.    else
  206.       return( "OFF" );
  207. }
  208.  
  209. // Stuff from GfxBase:
  210.  
  211. SUBFUNC char *GetDMACustomName( void )
  212. {
  213.    if ((GfxBase->ChipRevBits0 & GFXF_AA_ALICE) == GFXF_AA_ALICE)
  214.       return( "Alice" );
  215.  
  216.    if ((GfxBase->ChipRevBits0 & GFXF_HR_AGNUS) == GFXF_HR_AGNUS)
  217.       return( "Agnus" );
  218.    else
  219.       return( "Agnus" );
  220. }
  221.  
  222. SUBFUNC char *GetGraphicCustomName( void )
  223. {
  224.    if ((GfxBase->ChipRevBits0 & GFXF_AA_MLISA) == GFXF_AA_MLISA)
  225.       return( "MLisa" );
  226.  
  227.    if ((GfxBase->ChipRevBits0 & GFXF_AA_LISA) == GFXF_AA_LISA)
  228.       return( "Lisa" );
  229.  
  230.    if ((GfxBase->ChipRevBits0 & GFXF_HR_DENISE) == GFXF_HR_DENISE)
  231.       return( "Denise" );
  232.    else
  233.       return( "Denise" );
  234. }
  235.  
  236. SUBFUNC char *GetVideoType( void )
  237. {
  238.    if ((GfxBase->DisplayFlags & NTSC) == NTSC)
  239.       return( "NTSC" );
  240.  
  241.    if ((GfxBase->DisplayFlags & PAL) == PAL)
  242.       return( "PAL" );
  243.  
  244.    if ((GfxBase->DisplayFlags & GENLOCK) == GENLOCK)
  245.       return( "GENLOCK" );
  246.    else
  247.       return( "NTSC" );
  248. }
  249.  
  250. // Version info:
  251.  
  252. PRIVATE char wbv[24];
  253.  
  254. SUBFUNC char *GetWorkbenchVersion( void )
  255. {
  256.    struct Library *wbenchbase = NULL;
  257.    
  258.    if ((wbenchbase = OpenLibrary( "workbench.library", 0L )) == NULL)
  259.       return( "Unable to open!" );
  260.  
  261.    sprintf( wbv, "%d.%d", 
  262.                  wbenchbase->lib_Version, 
  263.                  wbenchbase->lib_Revision 
  264.           );
  265.  
  266.    CloseLibrary( wbenchbase );
  267.  
  268.    return( &wbv[0] );
  269. }
  270.  
  271. PRIVATE char exv[24];
  272.  
  273. SUBFUNC char *GetExecVersion( void )
  274. {
  275.    sprintf( exv, "%d.%d", SysBase->LibNode.lib_Version,
  276.                           SysBase->LibNode.lib_Revision
  277.           ); 
  278.  
  279.    return( &exv[0] );
  280. }
  281.  
  282. PRIVATE char dosv[24];
  283.  
  284. SUBFUNC char *GetDosVersion( void )
  285. {
  286.    struct DosLibrary *dosbase = NULL; // <dos/dosextens.h>
  287.    
  288.    if ((dosbase = (struct DosLibrary *)
  289.                   OpenLibrary( "dos.library", 0L )) == NULL)
  290.       return( "Unable to open!" );
  291.  
  292.    sprintf( dosv, "%d.%d", 
  293.                  dosbase->dl_lib.lib_Version, 
  294.                  dosbase->dl_lib.lib_Revision 
  295.           );
  296.  
  297.    CloseLibrary( (struct Library *) dosbase );
  298.  
  299.    return( &dosv[0] );
  300. }
  301.  
  302. SUBFUNC int WriteBoardInfo( void )
  303. {
  304.    struct ConfigDev *cd = NULL;
  305.    int                i = 1;
  306.    
  307.    if ((ExpansionBase = (struct ExpansionBase *) 
  308.                         OpenLibrary( EXPANSIONNAME, 0 )) == NULL)
  309.       {
  310.       printf( "Couldn't open %s!\n", EXPANSIONNAME );
  311.       return( -1 );
  312.       }
  313.  
  314.    while (((cd = FindConfigDev( cd, -1, -1 )) != 0) && (i < MAXHVNODES))
  315.       {
  316.       sprintf( &NodeStrs[ i * NODELENGTH ], &fmt[0],
  317.                cd->cd_BoardAddr,
  318.                cd->cd_BoardSize,
  319.                cd->cd_Rom.er_Manufacturer,
  320.                cd->cd_Rom.er_Product,
  321.                cd->cd_Driver == 0 ? "NO" : "YES", 
  322.                cd->cd_Rom.er_Flags,
  323.                cd->cd_Rom.er_SerialNumber,
  324.                cd->cd_Rom.er_InitDiagVec,
  325.                cd->cd_Rom.er_Type 
  326.              );
  327.  
  328.       i++;
  329.       }
  330.  
  331.    CloseLibrary( (struct Library *) ExpansionBase );
  332.  
  333.    return( i ); // Other stuff will be added to the nodes.
  334. }
  335.  
  336. PRIVATE int SetupHardwareLV( void )
  337. {
  338.    int i = WriteBoardInfo();
  339.       
  340.    if (i < 0)
  341.       i = 3;
  342.  
  343.    if (i >= MAXHVNODES - 12)
  344.       {
  345.       return( 0 );
  346.       }
  347.  
  348.    i++;
  349.  
  350.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  351.             "Processor -----------: %s", GetProcType()   
  352.           );
  353.  
  354.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  355.             "Math --- Co-Processor: %s", GetFPUType()    
  356.           );
  357.  
  358.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  359.             "CPU Instruction Cache: %s", GetInstCache()  
  360.           );
  361.  
  362.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  363.             "CPU Instruction Burst: %s", GetBurstCache() 
  364.           );
  365.  
  366.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  367.             "CPU Data ------ Cache: %s", GetDataCache()  
  368.           );
  369.  
  370.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  371.             "CPU Data ------ Burst: %s", GetBurstCache() 
  372.           );
  373.  
  374.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  375.             "CPU -------- CopyBack: %s", GetCopyBackCache() 
  376.           );
  377.  
  378.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  379.             "DMA ----- Custom Chip: %s (%s)", GetDMACustomName(),
  380.                                               GetVideoType()
  381.           );
  382.  
  383.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  384.             "Graphic   Custom Chip: %s", GetGraphicCustomName() 
  385.           );
  386.  
  387.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  388.             "WorkBench     Version: %s", GetWorkbenchVersion()
  389.           );   
  390.  
  391.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  392.             "Exec          Version: %s", GetExecVersion() 
  393.           );
  394.  
  395.    sprintf( &NodeStrs[ i++ * NODELENGTH ],
  396.             "Dos           Version: %s", GetDosVersion() 
  397.           );   
  398.       
  399.    return( 0 );
  400. }
  401.  
  402. // ----------------------------------------------------------------------
  403.  
  404. PRIVATE int OpenATSWindow( void )
  405. {
  406.    struct NewGadget  ng;
  407.    struct Gadget    *g;
  408.    UWORD             lc, tc;
  409.    UWORD             wleft = ATSLeft, wtop = ATSTop, ww, wh;
  410.  
  411.    ComputeFont( Scr, Font, &CFont, ATSWidth, ATSHeight );
  412.  
  413.    ww = ComputeX( CFont.FontX, ATSWidth  );
  414.    wh = ComputeY( CFont.FontY, ATSHeight );
  415.  
  416.    if ((wleft + ww + CFont.OffX + Scr->WBorRight) > Scr->Width)
  417.       wleft = Scr->Width - ww;
  418.  
  419.    if ((wtop + wh + CFont.OffY + Scr->WBorBottom) > Scr->Height)
  420.       wtop = Scr->Height - wh;
  421.  
  422.    if ((ATSFont = OpenDiskFont( Font )) == NULL)
  423.       return( -5 );
  424.  
  425.    if ((g = CreateContext( &ATSGList )) == NULL)
  426.       return( -1 );
  427.  
  428.    for (lc = 0, tc = 0; lc < ATS_CNT; lc++)
  429.       {
  430.       CopyMem( (char *) &ATSNGad[lc], (char *) &ng, 
  431.                (long) sizeof( struct NewGadget )
  432.              );
  433.  
  434.       ng.ng_VisualInfo = VisualInfo;
  435.       ng.ng_TextAttr   = Font;
  436.  
  437.       ng.ng_LeftEdge   = CFont.OffX + ComputeX( CFont.FontX, 
  438.                                                 ng.ng_LeftEdge
  439.                                               );
  440.  
  441.       ng.ng_TopEdge    = CFont.OffY + ComputeY( CFont.FontY, 
  442.                                                 ng.ng_TopEdge
  443.                                               );
  444.  
  445.       ng.ng_Width      = ComputeX( CFont.FontX, ng.ng_Width );
  446.       ng.ng_Height     = ComputeY( CFont.FontY, ng.ng_Height );
  447.  
  448.       ATSGadgets[lc] = g 
  449.                      = CreateGadgetA( (ULONG) ATSGTypes[lc], 
  450.                                       g, 
  451.                                       &ng, 
  452.                                       (struct TagItem *) &ATSGTags[tc]
  453.                                     );
  454.  
  455.       while (ATSGTags[tc] != TAG_DONE)
  456.          tc += 2;
  457.  
  458.       tc++;
  459.  
  460.       if (g == NULL)
  461.          return( -2 );
  462.       }
  463.  
  464.    if ((ATSWnd = OpenWindowTags( NULL,
  465.  
  466.                   WA_Left,        wleft,
  467.                   WA_Top,         wtop,
  468.                   WA_Width,       ww + CFont.OffX + Scr->WBorRight,
  469.                   WA_Height,      wh + CFont.OffY + Scr->WBorBottom,
  470.                   
  471.                   WA_IDCMP,       LISTVIEWIDCMP | BUTTONIDCMP 
  472.                     | IDCMP_CLOSEWINDOW | IDCMP_REFRESHWINDOW 
  473.                     | IDCMP_VANILLAKEY,
  474.                   
  475.                   WA_Flags,       WFLG_DRAGBAR | WFLG_DEPTHGADGET 
  476.                     | WFLG_CLOSEGADGET | WFLG_SMART_REFRESH 
  477.                     | WFLG_ACTIVATE | WFLG_RMBTRAP,
  478.                   
  479.                   WA_Gadgets,     ATSGList,
  480.                   WA_Title,       ATSWdt,
  481.                   WA_ScreenTitle, "System Hardware Info:",
  482.                   TAG_DONE )
  483.       ) == NULL)
  484.       return( -4 );
  485.  
  486.    GT_RefreshWindow( ATSWnd, NULL );
  487.  
  488.    return( 0 );
  489. }
  490.  
  491. PRIVATE void CloseATSWindow( void )
  492. {
  493.    if (ATSWnd != NULL)
  494.       {
  495.       CloseWindow( ATSWnd );
  496.       ATSWnd = NULL;
  497.       }
  498.  
  499.    if (ATSGList != NULL)
  500.       {
  501.       FreeGadgets( ATSGList );
  502.       ATSGList = NULL;
  503.       }
  504.  
  505.    if (ATSFont != NULL)
  506.       {
  507.       CloseFont( ATSFont );
  508.       ATSFont = NULL;
  509.       }
  510.  
  511.    return;
  512. }
  513.  
  514. PRIVATE int ATSCloseWindow( void )
  515. {
  516.    CloseATSWindow();
  517.    return( FALSE );
  518. }
  519.  
  520. PRIVATE int HLVClicked( void )
  521. {
  522.    // Nothing to do here:
  523.    return( TRUE );
  524. }
  525.  
  526. PRIVATE int CancelClicked( void )
  527. {
  528.    return( ATSCloseWindow() );
  529. }
  530.  
  531. PRIVATE int ATSVanillaKey( int whichkey )
  532. {
  533.    int rval = TRUE;
  534.    
  535.    switch (whichkey)
  536.       {
  537.       case 'c':
  538.       case 'C':
  539.          rval = CancelClicked();
  540.          break;
  541.          
  542.       case 'q':
  543.       case 'Q':
  544.       case 'x':
  545.       case 'X':
  546.          rval = FALSE;
  547.          break;
  548.       }
  549.       
  550.    return( rval );
  551. }
  552.  
  553. PRIVATE int HandleATSIDCMP( void )
  554. {
  555.    struct IntuiMessage  *m;
  556.    int                 (*func)( void );
  557.    BOOL                  running = TRUE;
  558.  
  559.    while (running == TRUE)
  560.       {
  561.       if ((m = GT_GetIMsg( ATSWnd->UserPort )) == NULL)
  562.          {
  563.          (void) Wait( 1L << ATSWnd->UserPort->mp_SigBit );
  564.          continue;
  565.          }
  566.  
  567.       CopyMem( (char *) m, (char *) &ATSMsg, 
  568.                (long) sizeof( struct IntuiMessage )
  569.              );
  570.  
  571.       GT_ReplyIMsg( m );
  572.  
  573.       switch (ATSMsg.Class)
  574.          {
  575.          case IDCMP_REFRESHWINDOW:
  576.             GT_BeginRefresh( ATSWnd );
  577.             GT_EndRefresh( ATSWnd, TRUE );
  578.             break;
  579.  
  580.          case IDCMP_CLOSEWINDOW:
  581.             running = ATSCloseWindow();
  582.             break;
  583.  
  584.          case IDCMP_VANILLAKEY:
  585.             running = ATSVanillaKey( ATSMsg.Code );
  586.             break;
  587.  
  588.          case IDCMP_GADGETUP:
  589.          case IDCMP_GADGETDOWN:
  590.             func = (void *) ((struct Gadget *) ATSMsg.IAddress)->UserData;
  591.             
  592.             if (func != NULL)
  593.                running = func();
  594.  
  595.             break;
  596.          }
  597.       }
  598.  
  599.    return( running );
  600. }
  601.  
  602. PRIVATE int HandleHardware( void )
  603. {
  604.    struct Node ttlNode = { 0, };
  605.    int               i = 0;
  606.     
  607.    ttlNode.ln_Succ = (struct Node *) HLVList.lh_Tail;
  608.    ttlNode.ln_Pred = (struct Node *) HLVList.lh_Head;
  609.    ttlNode.ln_Type = 0;
  610.    ttlNode.ln_Pri  = 127;
  611.    ttlNode.ln_Name = &ttl[0];
  612.  
  613.    HLVNodes[0] = ttlNode;
  614.  
  615.    // Open Libraries, Screen & Window:
  616.    if (SetupSystemList( &OpenATSWindow ) < 0)
  617.       {
  618.       fprintf( stderr, "Couldn't open a System ListViewer!\n" );
  619.       return( -1 );
  620.       }
  621.    
  622.    SetNotifyWindow( ATSWnd );
  623.  
  624.    for (i = 1; i <= MAXHVNODES; i++)
  625.       {
  626.       HLVNodes[i].ln_Name = &NodeStrs[ i * NODELENGTH ];
  627.       HLVNodes[i].ln_Pri  = 127 - i;
  628.       }
  629.  
  630.    NewList( &HLVList );      
  631.  
  632.    for (i = 0; i < MAXHVNODES; i++)
  633.       Enqueue( &HLVList, &HLVNodes[ i ] );
  634.  
  635.    HideListFromView( ATSGadgets[ HLV ], ATSWnd );
  636.  
  637.    (void) SetupHardwareLV(); // Make the list.
  638.  
  639.    ModifyListView( ATSGadgets[ HLV ], ATSWnd, 
  640.                    (struct List *) &HLVList, NULL
  641.                  );
  642.  
  643.    GT_RefreshWindow( ATSWnd, NULL );
  644.  
  645.    (void) HandleATSIDCMP();
  646.    
  647.    // Close Libraries, Screen & Window:
  648.    ShutdownSystemList();
  649.  
  650.    return( 0 );
  651. }
  652.  
  653. PUBLIC int ShowHardware( void )
  654. {
  655.    int rval = 0;
  656.  
  657.    rval = HandleHardware();
  658.    
  659.    return( rval );
  660. }
  661.  
  662. #ifdef DEBUG
  663.  
  664. PUBLIC int main( void )
  665. {
  666.    return( ShowHardware() );
  667. }
  668.  
  669. #endif
  670.  
  671. /* -------------------- END of SysHardware.c file! ------------------ */
  672.